package com.car.dal.dao.pos;

import java.util.List;

import com.car.bean.GridObj;
import com.car.bean.OrderObj;
import com.car.bean.PageObj;
import com.car.dal.dao.ibatis.IbatisCommonDao;
import com.car.dal.object.TgPos;
import com.car.util.Page;

public class TgPosDaoImpl extends IbatisCommonDao<TgPos, Long> implements TgPosDao {

	public GridObj GetList(TgPos pos, PageObj pageObj) {
		OrderObj order = new OrderObj();
		order.setDir("desc");
		order.setSort("id");
		// TODO Auto-generated method stub
		return super.findByPage(pos, pageObj, order);
	}
	
	public Integer getPosCountByType(TgPos pos) {
		return this.queryForInteger("getPosCountByType", pos);
	}
	
	public List<TgPos> getPosListByType(TgPos pos, Page page) {
		pos.setFirstrownum(page.getFirstrownum());
		pos.setPagesize(page.getPagesize());
		List<TgPos> list=this.queryForEntityList(TgPos.class,"getPosListByType", pos);
		return list;
	}
}
